package com.taobushi;

import com.taobushi.entity.User;
import com.taobushi.entity.User2;
import com.taobushi.mapper.UserMapper;
import com.taobushi.service.TestService;
import org.junit.Test;
import org.junit.runner.RunWith;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.boot.test.context.SpringBootTest;
import org.springframework.test.context.junit4.SpringJUnit4ClassRunner;

import java.util.List;

@RunWith(SpringJUnit4ClassRunner.class)
@SpringBootTest(classes = MyAopDataSourceApplication.class)
public class MyTestN {
    @Autowired
    TestService testService;

    @Test
    public void test1(){
        List<User> userList = testService.getUserList();
        System.out.println("userList = " + userList);
        List<User2> user2List = testService.getUser2List();
        System.out.println("user2List = " + user2List);
    }
}
